package com.leo.foodmaster.admin.stock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leo.foodmaster.admin.stock.entity.WarehouseOutRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leo.foodmaster.commons.entity.Result;

/**
 * <p>
 * 出库记录 服务类
 * </p>
 *
 * @author Leo
 * @since 2021-09-11
 */
public interface IWarehouseOutRecordService extends IService<WarehouseOutRecord> {

    /**
     * 条件分页查询出库记录列表
     * @param page 分页条件
     * @param warehouseId 仓库Id
     * @param serialNum 单据编号
     * @param status 单据状态
     * @param beginTime 开始时间
     * @param endTime 结束时间
     * @return IPage<WarehouseOutRecord>
     */
    IPage<WarehouseOutRecord> getWarehouseOutRecordPageList(Page<WarehouseOutRecord> page, Long warehouseId,
                                                            String serialNum, String status,
                                                            String beginTime, String endTime);

    /**
     * 新增出库记录
     * @param warehouseOutRecord 出库记录信息
     * @return Result<Object>
     */
    Result<Object> addWarehouseOutRecord(WarehouseOutRecord warehouseOutRecord);

    /**
     * 修改出库记录
     * @param warehouseOutRecord 出库记录
     * @return Result<Object>
     */
    Result<Object> updateWarehouseOutRecord(WarehouseOutRecord warehouseOutRecord);

    /**
     * 删除出库清单
     * @param id 出库单Id
     * @return Result<Object>
     */
    Result<Object> deleteWarehouseOutRecord(Long id);

    /**
     * 审核出库记录
     * @param warehouseOutRecord 入库记录
     * @return Result<Object>
     */
    Result<Object> checkWarehouseOutRecord(WarehouseOutRecord warehouseOutRecord);
}
